<template>
  <div style="overflow: hidden">
    <el-image :src="dataMessage.imageUrl">
      <template #placeholder>
        <div class="image-slot">Loading<span class="dot">...</span></div>
      </template>
    </el-image>
    <div class="name">
      {{ dataMessage.name }}
    </div>
    <div class="text">
      {{ dataMessage.description }}
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref } from "vue";
import { ElImage } from "element-plus"
export default defineComponent({
  components: {ElImage},
  props: ["message"],
  setup(props) {
    const dataMessage = ref<any>();
    dataMessage.value = props.message;
    return {
      dataMessage,
    };
  },
});
</script>

<style lang="less" scoped>
img {
  max-width: 100em;
}
.name {
  margin-top: 10px;
  font-size: 2.5em;
  color: #ffcc33;
}
.text {
  margin-top: 20px;
  text-align: left;
  font-size: 2em;
  text-indent: 2em;
}
</style>
